package com.yunpeng.aidevice.dao.groovy;

import groovy.lang.GroovyClassLoader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * GroovyFactory
 *
 * @author : Moore(hemw)
 * @date : 2020-04-17
 */
public enum GroovyFactory {

    /**
     * 单例
     */
    INSTANCE;

    /**
     * 日志对象
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(GroovyFactory.class);

    /**
     * 脚本class loader
     */
    private GroovyClassLoader groovyClassLoader;



    /**
     * 初始化脚本class loader
     *
     * @return
     */
    private GroovyClassLoader getGroovyClassLoader() {
        if (groovyClassLoader == null) {
            groovyClassLoader = new GroovyClassLoader();
        }
        return groovyClassLoader;
    }



}
